package cn.bby.query.server.infrastructure.db.mapper;

import cn.bby.query.server.infrastructure.db.entity.InterfaceInfoPO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 接口配置信息表(InterfaceMetaInfo)表数据库访问层
 *
 * @author makejava
 * @since 2025-04-18 23:02:42
 */
@Mapper
public interface InterfaceInfoMapper extends BaseMapper<InterfaceInfoPO> {

    @Select("select * from interface_info i where status <> 'ARCHIVED' and i.interface_id in (select distinct interface_id from interface_column where table_id in (#{tableId}) and is_archived = false)")
    List<InterfaceInfoPO> listByTableIds(@Param("tableId") String tableIdStr);
}

